import {http} from "@/interceptor/luch-request/index.js"

// 创建菜单
export const savebasicMenu = (data) => {
    return http.post("api/admin/basicMenu/v1/save", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// 后台左侧菜单
export const getByMenu = (data) => {
	return http.get("api/admin/basicMenu/v1/getByMenu", {
		data: data
	});
}
// app应用列表
export const getByApp = (data) => {
	return http.get("api/admin/basicMenu/v1/getByApp", {
		data: data
	});
}
// 菜单列表
export const listBootstrapTree = (data) => {
	return http.get("api/admin/basicMenu/v1/listBootstrapTree", {
		data: data
	});
}


// 菜单列表2
export const listBootstrap = (data) => {
	return http.get("api/admin/basicMenu/v1/listBootstrap", {
		data: data
	});
}

// 菜单列表3
export const listAllMenuTable = (data) => {
	return http.get("api/admin/basicMenu/v1/listAllMenuTable", {
		data: data
	});
}

// 删除系统菜单
export const basicMenudelete = (id) => {
    return http.delete("api/admin/basicMenu/v1/delete/" + id,{
        header: {
            "content-type": "application/x-www-form-urlencoded",
        }
    });
}


export const update = (data) => {
    return http.put("api/admin/basicMenu/v1/update", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}